import request from '@/config/axios'

// 功能表 VO
export interface ProjectCellTableVO {
  id: number // 编号
  projectId: number // 项目id
  name: string // 表名称
}

// 功能表 API
export const ProjectCellTableApi = {
  // 查询功能表分页
  getProjectCellTablePage: async (params: any) => {
    return await request.get({ url: `/agent/project-cell-table/page`, params })
  },

  // 查询功能表详情
  getProjectCellTable: async (id: number) => {
    return await request.get({ url: `/agent/project-cell-table/get?id=` + id })
  },

  // 新增功能表
  createProjectCellTable: async (data: ProjectCellTableVO) => {
    return await request.post({ url: `/agent/project-cell-table/create`, data })
  },

  // 修改功能表
  updateProjectCellTable: async (data: ProjectCellTableVO) => {
    return await request.put({ url: `/agent/project-cell-table/update`, data })
  },

  // 删除功能表
  deleteProjectCellTable: async (id: number) => {
    return await request.delete({ url: `/agent/project-cell-table/delete?id=` + id })
  },

  // 导出功能表 Excel
  exportProjectCellTable: async (params) => {
    return await request.download({ url: `/agent/project-cell-table/export-excel`, params })
  },
}